﻿using System.Collections.Generic;
using CiStatus.CiStatusAddIn.Logic.PluginInterfaces;
using CiStatus.CiStatusAddIn.Logic.Status;

namespace CiStatus.CiStatusAddIn.Logic
{
    public class Project : IProject
    {
        private readonly IRefreshCiStatus _refreshCiStatus;

    	public Project(IRefreshCiStatus refreshCiStatus, IDictionary<string, ICiPollerParameter> parameters)
        {
            _refreshCiStatus = refreshCiStatus;
            Parameters = parameters;
        }

    	public IDictionary<string, ICiPollerParameter> Parameters { get; private set; }

    	public IStatus CurrentStatus
        {
            get { return _refreshCiStatus.CurrentStatus; }
        }

        public IStatus PreviousStatus
        {
            get { return _refreshCiStatus.PreviousStatus; }
        }

        public void Refresh(ICallBack callBack)
        {
            _refreshCiStatus.Refresh(callBack);
        }
    }
}